Created: 2022-06-25
Tags: #permanent
TIP: You NEED to free all memory first before reusing a linked list.
while (list != NULL)
{
node *tmp = list->next;
free(list);
list = tmp;
}
Memory leaks don't automatically cause problems
-> until you've run out of memory and your call to malloc suddenly fails